package com.lightboat.system.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lightboat.common.annotation.Excel;
import com.lightboat.common.core.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 城市对象 crm_city
 * 
 * @author lightboat
 * @date 2025-08-21
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Schema(title = "城市")
@TableName(value = "crm_city", autoResultMap = true)
public class CrmCity extends BaseEntity {
    private static final long serialVersionUID = 1L;
    
    @TableId
    private Long id;

    /** 城市id */
    @Schema(title = "城市id")
    @Excel(name = "城市id")
    private Long cityId;

    /** 省市级别 */
    @Schema(title = "省市级别")
    @Excel(name = "省市级别")
    private Long level;

    /** 父级id */
    @Schema(title = "父级id")
    @Excel(name = "父级id")
    private Long parentId;

    /** 区号 */
    @Schema(title = "区号")
    @Excel(name = "区号")
    private String areaCode;

    /** 名称 */
    @Schema(title = "名称")
    @Excel(name = "名称")
    private String name;

    /** 合并名称 */
    @Schema(title = "合并名称")
    @Excel(name = "合并名称")
    private String mergerName;

    /** 经度 */
    @Schema(title = "经度")
    @Excel(name = "经度")
    private String lng;

    /** 纬度 */
    @Schema(title = "纬度")
    @Excel(name = "纬度")
    private String lat;

    /** 是否展示 */
    @Schema(title = "是否展示")
    @Excel(name = "是否展示")
    private Integer isShow;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("cityId", getCityId())
            .append("level", getLevel())
            .append("parentId", getParentId())
            .append("areaCode", getAreaCode())
            .append("name", getName())
            .append("mergerName", getMergerName())
            .append("lng", getLng())
            .append("lat", getLat())
            .append("isShow", getIsShow())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("remark", getRemark())
            .toString();
    }
}
